Skip to content

[stable32] refactor: docmdp enum naming#6020

Merged
vitormattos merged 3 commits intostable32from
backport/6018/stable32
Dec 6, 2025
Merged

[stable32] refactor: docmdp enum naming#6020
vitormattos merged 3 commits intostable32from
backport/6018/stable32

Conversation

@backportbot-libresign
Copy link
Copy Markdown

Backport of PR #6018

- NOT_CERTIFIED (was NONE)
- CERTIFIED_NO_CHANGES_ALLOWED (was NO_CHANGES)
- CERTIFIED_FORM_FILLING (was FORM_FILL)
- CERTIFIED_FORM_FILLING_AND_ANNOTATIONS (was FORM_FILL_AND_ANNOTATIONS)

This aligns enum case names with JSignPdf -cl parameter values,
allowing direct use of enum->name without conversion layer.

Signed-off-by: Vitor Mattos <[email protected]>
Update all references to DocMdpLevel enum cases:
- NONE → NOT_CERTIFIED
- NO_CHANGES → CERTIFIED_NO_CHANGES_ALLOWED
- FORM_FILL → CERTIFIED_FORM_FILLING
- FORM_FILL_AND_ANNOTATIONS → CERTIFIED_FORM_FILLING_AND_ANNOTATIONS

Updated in:
- ALLOWED_MODIFICATIONS constant
- extractDocMdpLevel() fallback values
- getAllowedModificationMessage() match expression
- getViolationMessage() match expression
- validateModifications() condition checks

Signed-off-by: Vitor Mattos <[email protected]>
Update all test assertions and data providers to use renamed enum cases:
- NONE → NOT_CERTIFIED
- NO_CHANGES → CERTIFIED_NO_CHANGES_ALLOWED
- FORM_FILL → CERTIFIED_FORM_FILLING
- FORM_FILL_AND_ANNOTATIONS → CERTIFIED_FORM_FILLING_AND_ANNOTATIONS

All 30 tests passing with new nomenclature.

Signed-off-by: Vitor Mattos <[email protected]>
@github-project-automation github-project-automation Bot moved this to 0. Needs triage in Roadmap Dec 6, 2025
@backportbot-libresign backportbot-libresign Bot added this to the Next Patch (32) milestone Dec 6, 2025
@vitormattos vitormattos merged commit 327d275 into stable32 Dec 6, 2025
43 of 53 checks passed
@vitormattos vitormattos deleted the backport/6018/stable32 branch December 6, 2025 21:06
@github-project-automation github-project-automation Bot moved this from 0. Needs triage to 4. to release in Roadmap Dec 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant